

type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>

interface Todo {
  title: string
  completed: boolean
  description: string
  // phone: number
}

type TodoPreview = Omit<Todo, "description">// !不获取 Todo里面的description属性

// 等价于
type TodoPreview3 = Pick<Todo, Exclude<keyof Todo, "description">>


// type TodoPreview2 = Omit<Todo, "phone">// 不存在 phone 会报错

const todo: TodoPreview = {
  title: 'Clean room',
  completed: false,
}

export {}